-
Notifications
You must be signed in to change notification settings - Fork 24
1366 update exit code #1369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1366 update exit code #1369
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Updates the application's exit code handling to return exit code 2 for error conditions instead of 0, addressing issue #1366. This ensures proper error reporting to external systems that depend on exit codes.
- Changed application exit codes from 0 to 2 for various error conditions
- Added exclude rules functionality with new
--exclude-rulesCLI option - Added validation to prevent simultaneous use of include and exclude rules
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| core.py | Added exclude-rules CLI option and updated exit codes to 2 for error conditions |
| cdisc_rules_engine/models/validation_args.py | Added exclude_rules field to validation args model |
| scripts/script_utils.py | Enhanced rule loading functions to support exclude rules and updated error handling |
| tests/unit/test_script_utils.py | Added comprehensive tests for new exclude rules functionality |
| tests/unit/test_services/test_data_service/test_data_service.py | Updated test data to include additional None parameter |
| tests/QARegressionTests/test_core/test_validate.py | Added tests for exclude rules and updated expected exit codes |
| README.md | Updated documentation to include new exclude-rules option |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Reverted the change introduced by #1351 for the -vx flag (--validate-xml). |
|
Could you please resolve the conflicts on this ticket ? and then we are good to merge. |
Ramil, the conflict is resolved now. |
|
There is another conflict. Could you please look into that one too? |
Updated |
|
@gerrycampion I'm getting an error with the test_jsonata_processor.py in this branch. I've tested it in the main branch and the same error is happening there, so it looks like it is not connected with this branch, but rather something is wrong in the main branch. Could you please help to look into it, as I understand you added this test. Looks like in execute_jsonata_rule in this line: USUBJID and SEQ are expected and usubjid/sequence are passed. This difference was introduced by #1376 PR. |
|
@DmitryMK PR is here: #1377 |
RamilCDISC
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR updates the exit code so an exit code 2 is returned for errors instead of 0. The PR was validated by:
- Verifying the updated code.
- Ensuring all relevant error messages are updated.
- Ensuring the relevant testing is updated.
- Ensuring all unit tests and other testing pass.
- Ensuing the manual testing pass.
Addresses #1366
It is build on top of #1365, which should be merged (or rejected) first.